package com.jk.controller;

import com.jk.dto.SysDictData;
import com.jk.pojo.ResponseResult;
import com.jk.service.SysDictDataServiceFegin;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yzf
 * @version 1.0
 * @description: TODO
 * @date 2024/12/11 17:26
 */
@Api(tags = "下拉列表模块")
@RestController
@RequestMapping(value = "sysdict")
public class SysDictDataController {
    @Autowired
    private SysDictDataServiceFegin sysDictDataServiceFegin;

    @ApiOperation(value = "查询性别",httpMethod = "POST")
    @PostMapping(value = "findSysDictBySex")
    public ResponseResult<List<SysDictData>> findSysDictBySex(String type){
        return new ResponseResult<>(200,"查询成功",sysDictDataServiceFegin.findSysDictBySex(type));
    }
    @ApiOperation(value = "查询状态",httpMethod = "GET")
    @GetMapping(value = "findSysDictByStatus")
    public ResponseResult<List<SysDictData>> findSysDictByStatus(){
        return new ResponseResult<>(200,"查询成功",sysDictDataServiceFegin.findSysDictByStatus());
    }
}
